package com.lwy.qiuchao.order.web;

import com.lwy.common.utils.R;
import com.lwy.qiuchao.order.service.OrderService;
import com.lwy.qiuchao.order.vo.BoxOrderVo;
import com.lwy.qiuchao.order.vo.SubmitOrderVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order/web/")
public class OrderWebController {

    @Autowired
    OrderService orderService;

    @PostMapping("confirmVending")
    public R confirmVendingOrder(@RequestBody SubmitOrderVo submitOrderVo) {

        orderService.confirmVendingOrder(submitOrderVo);

        return R.ok();
    }


    @PostMapping("confirmSafetyBox")
    public R confirmBoxOrder(@RequestBody BoxOrderVo boxOrderVo) {

        orderService.confirmBoxOrder(boxOrderVo);

        return R.ok();
    }

}
